package com.yourname.menu;

import com.yourname.action.CourseAction;
import com.yourname.action.LoginAction;
import com.yourname.action.ScoreAction;

import java.util.Scanner;

public class ScoreManageMenu {
    public static void courseMenu(){
        while (true){
        StringBuilder menuStrBuilder=new StringBuilder();
        menuStrBuilder.append("1.成绩录入\n");
        menuStrBuilder.append("2.打印成绩单\n");
        menuStrBuilder.append("3.返回上一级\n");
        System.out.println(menuStrBuilder);
        Scanner scanner=new Scanner(System.in);
            int i = scanner.nextInt();
            switch (i){
                case 1-> ScoreAction.addScore(LoginAction.getCurrent());
                case 2-> ScoreAction.print(LoginAction.getCurrent(),LoginAction.getLoginTag());
            }
            if (i==3)
                break;
        }

    }
}
